import socketio

from comm.openDbConfig import openDbBase

sio = socketio.Client()

@sio.on('connect')
def on_connect():
    print("client connect")

@sio.on('world')
def world(data):
    print('client receive:', data)
def clientLoginOut(sid):
    config = openDbBase()
    sio.connect('http://127.0.0.1:'+str(config["SCOKETIOPORT"]))
    sio.emit("serveLoginOut", {"sid": sid,"msg":"强制下线消息提醒"})
    sio.disconnect()
    return

# clientLoginOut(34124)